package com.ruoyi.user.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.user.mapper.UserZfbCountMapper;
import com.ruoyi.user.domain.UserZfbCount;
import com.ruoyi.user.service.IUserZfbCountService;

/**
 * 用户支付宝账户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-16
 */
@Service
public class UserZfbCountServiceImpl implements IUserZfbCountService 
{
    @Autowired
    private UserZfbCountMapper userZfbCountMapper;

    /**
     * 查询用户支付宝账户
     * 
     * @param id 用户支付宝账户主键
     * @return 用户支付宝账户
     */
    @Override
    public UserZfbCount selectUserZfbCountById(Long id)
    {
        return userZfbCountMapper.selectUserZfbCountById(id);
    }

    /**
     * 查询用户支付宝账户列表
     * 
     * @param userZfbCount 用户支付宝账户
     * @return 用户支付宝账户
     */
    @Override
    public List<UserZfbCount> selectUserZfbCountList(UserZfbCount userZfbCount)
    {
        return userZfbCountMapper.selectUserZfbCountList(userZfbCount);
    }

    /**
     * 新增用户支付宝账户
     * 
     * @param userZfbCount 用户支付宝账户
     * @return 结果
     */
    @Override
    public int insertUserZfbCount(UserZfbCount userZfbCount)
    {
        userZfbCount.setCreateTime(DateUtils.getNowDate());
        return userZfbCountMapper.insertUserZfbCount(userZfbCount);
    }

    /**
     * 修改用户支付宝账户
     * 
     * @param userZfbCount 用户支付宝账户
     * @return 结果
     */
    @Override
    public int updateUserZfbCount(UserZfbCount userZfbCount)
    {
        userZfbCount.setUpdateTime(DateUtils.getNowDate());
        return userZfbCountMapper.updateUserZfbCount(userZfbCount);
    }

    /**
     * 批量删除用户支付宝账户
     * 
     * @param ids 需要删除的用户支付宝账户主键
     * @return 结果
     */
    @Override
    public int deleteUserZfbCountByIds(Long[] ids)
    {
        return userZfbCountMapper.deleteUserZfbCountByIds(ids);
    }

    /**
     * 删除用户支付宝账户信息
     * 
     * @param id 用户支付宝账户主键
     * @return 结果
     */
    @Override
    public int deleteUserZfbCountById(Long id)
    {
        return userZfbCountMapper.deleteUserZfbCountById(id);
    }
}
